package com.zjl.spring.enums;

/**
 * @Auther: zhuangjl
 * @Date: 2021/11/11 15:25
 */
public enum BaseCode implements BaseCodeI {

    SUCCESS("100000", "操作成功"),
    ERROR("100001", "操作失败"),
    UNKNOWN_ERROR("100002", "未知的系统错误"),
    BUSINESS_ERROR("100003", "业务执行异常"),
    PARAM_MISSING("100004", "缺少参数"),
    DB_ERROR("100005", "数据库访问异常");

    private final String code;

    private final String desc;

    private BaseCode(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getDesc() {
        return this.desc;
    }
}
